const mongoose = require('mongoose')
const initCities = require('@root/InitDatas/cityList.json')
const chalk = require('chalk')

const citySchema = new mongoose.Schema({
  label: String,
  name: String,
  pinyin: String,
  zip: String
})

const cityListModel = mongoose.model('cityList', citySchema)

// 初始化城市数据
// cityListModel.insertMany(initCities, (err) => {
//   if (err) return chalk.red(err)
//   chalk.green("init cityList successfully...")
// })

module.exports = cityListModel


